package com.xxc.service.impl;

import com.xxc.domain.Student;
import com.xxc.mapper.StudentMapper;
import com.xxc.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> findAll() {
        return studentMapper.findAll();
    }

    @Override
    public void save(Student student) {
        studentMapper.save(student);
    }

    @Override
    public void update(Student student) {
        studentMapper.update(student);
    }

    @Override
    public void delete(String number) {
        studentMapper.delete(number);
    }

    @Override
    public Student findById(String number) {
        return studentMapper.findById(number);

    }
}
